package com.opentae.data.mall.examples;

import com.opentae.core.mybatis.SgExample;
import com.opentae.core.mybatis.example.EntityColumn;
import com.opentae.core.mybatis.example.EntityTable;
import com.opentae.core.mybatis.mapperhelper.EntityHelper;
import com.opentae.data.mall.beans.MallArea;

import java.util.*;
public class MallAreaExample extends SgExample<MallAreaExample.Criteria> {
    public static final Class<MallArea> beanClass = MallArea.class;
    public static final EntityTable entityTable = EntityHelper.getEntityTable(beanClass);
    public static EntityColumn areaId;
    public static EntityColumn name;
    public static EntityColumn cityId;
    static {
        Set<EntityColumn> columns = entityTable.getEntityClassColumns();
        Map<String, EntityColumn> listMap = new HashMap<>();
        for (EntityColumn column : columns) {
            listMap.put(column.getProperty(), column);
        }
        areaId = listMap.get("areaId");
        name = listMap.get("name");
        cityId = listMap.get("cityId");
        }

    public MallAreaExample() {
        this.setTableAlias(entityTable.getName());
    }

    @Override
    public EntityTable getEntityTable() {
        return entityTable;
    }

    @Override
    protected MallAreaExample.Criteria createCriteriaInternal() {
        return new MallAreaExample.Criteria(this);
    }

    public static class Criteria extends SgExample.GeneratedCriteria<Criteria> {
        protected Criteria(SgExample example) {
            super(example);
        }

        public MallAreaExample.Criteria andAreaIdIsNull() {
            return isNull(areaId);
        }

        public MallAreaExample.Criteria andAreaIdIsNotNull() {
            return isNotNull(areaId);
        }

        public MallAreaExample.Criteria andAreaIdEqualTo(Long value) {
            return equalTo(areaId, value);
        }

        public MallAreaExample.Criteria andAreaIdNotEqualTo(Long value) {
            return notEqualTo(areaId, value);
        }

        public MallAreaExample.Criteria andAreaIdGreaterThan(Long value) {
            return greaterThan(areaId, value);
        }

        public MallAreaExample.Criteria andAreaIdGreaterThanOrEqualTo(Long value) {
            return greaterThanOrEqualTo(areaId, value);
        }

        public MallAreaExample.Criteria andAreaIdLessThan(Long value) {
            return lessThan(areaId, value);
        }

        public MallAreaExample.Criteria andAreaIdLessThanOrEqualTo(Long value) {
            return lessThanOrEqualTo(areaId, value);
        }

        public MallAreaExample.Criteria andAreaIdIn(List<Long> values) {
            return in(areaId, values);
        }

        public MallAreaExample.Criteria andAreaIdNotIn(List<Long> values) {
            return notIn(areaId, values);
        }

        public MallAreaExample.Criteria andAreaIdBetween(Long value1, Long value2) {
            return between(areaId, value1, value2);
        }

        public MallAreaExample.Criteria andAreaIdNotBetween(Long value1, Long value2) {
            return notBetween(areaId, value1, value2);
        }
        public MallAreaExample.Criteria andNameIsNull() {
            return isNull(name);
        }

        public MallAreaExample.Criteria andNameIsNotNull() {
            return isNotNull(name);
        }

        public MallAreaExample.Criteria andNameEqualTo(String value) {
            return equalTo(name, value);
        }

        public MallAreaExample.Criteria andNameNotEqualTo(String value) {
            return notEqualTo(name, value);
        }

        public MallAreaExample.Criteria andNameGreaterThan(String value) {
            return greaterThan(name, value);
        }

        public MallAreaExample.Criteria andNameGreaterThanOrEqualTo(String value) {
            return greaterThanOrEqualTo(name, value);
        }

        public MallAreaExample.Criteria andNameLessThan(String value) {
            return lessThan(name, value);
        }

        public MallAreaExample.Criteria andNameLessThanOrEqualTo(String value) {
            return lessThanOrEqualTo(name, value);
        }

        public MallAreaExample.Criteria andNameLike(String value) {
            return like(name, value);
        }

        public MallAreaExample.Criteria andNameNotLike(String value) {
            return notLike(name, value);
        }

        public MallAreaExample.Criteria andNameIn(List<String> values) {
            return in(name, values);
        }

        public MallAreaExample.Criteria andNameNotIn(List<String> values) {
            return notIn(name, values);
        }

        public MallAreaExample.Criteria andNameBetween(String value1, String value2) {
            return between(name, value1, value2);
        }

        public MallAreaExample.Criteria andNameNotBetween(String value1, String value2) {
            return notBetween(name, value1, value2);
        }
        public MallAreaExample.Criteria andCityIdIsNull() {
            return isNull(cityId);
        }

        public MallAreaExample.Criteria andCityIdIsNotNull() {
            return isNotNull(cityId);
        }

        public MallAreaExample.Criteria andCityIdEqualTo(Long value) {
            return equalTo(cityId, value);
        }

        public MallAreaExample.Criteria andCityIdNotEqualTo(Long value) {
            return notEqualTo(cityId, value);
        }

        public MallAreaExample.Criteria andCityIdGreaterThan(Long value) {
            return greaterThan(cityId, value);
        }

        public MallAreaExample.Criteria andCityIdGreaterThanOrEqualTo(Long value) {
            return greaterThanOrEqualTo(cityId, value);
        }

        public MallAreaExample.Criteria andCityIdLessThan(Long value) {
            return lessThan(cityId, value);
        }

        public MallAreaExample.Criteria andCityIdLessThanOrEqualTo(Long value) {
            return lessThanOrEqualTo(cityId, value);
        }

        public MallAreaExample.Criteria andCityIdIn(List<Long> values) {
            return in(cityId, values);
        }

        public MallAreaExample.Criteria andCityIdNotIn(List<Long> values) {
            return notIn(cityId, values);
        }

        public MallAreaExample.Criteria andCityIdBetween(Long value1, Long value2) {
            return between(cityId, value1, value2);
        }

        public MallAreaExample.Criteria andCityIdNotBetween(Long value1, Long value2) {
            return notBetween(cityId, value1, value2);
        }
    }
}